
package org.springxrsk.modules.classes.wrapper;

import org.springxrsk.core.mp.support.BaseEntityWrapper;
import org.springxrsk.core.tool.utils.BeanUtil;
import org.springxrsk.modules.classes.pojo.entity.QyCourseEntity;
import org.springxrsk.modules.classes.pojo.vo.QyCourseVO;
import java.util.Objects;

/**
 * 课程管理 包装类,返回视图层所需的字段
 *
 *  @author
 * @since 2024-06-15
 */
public class QyCourseWrapper extends BaseEntityWrapper<QyCourseEntity, QyCourseVO>  {

	public static QyCourseWrapper build() {
		return new QyCourseWrapper();
 	}

	@Override
	public QyCourseVO entityVO(QyCourseEntity qyCourse) {
		QyCourseVO qyCourseVO = Objects.requireNonNull(BeanUtil.copyProperties(qyCourse, QyCourseVO.class));

		//User createUser = UserCache.getUser(qyCourse.getCreateUser());
		//User updateUser = UserCache.getUser(qyCourse.getUpdateUser());
		//qyCourseVO.setCreateUserName(createUser.getName());
		//qyCourseVO.setUpdateUserName(updateUser.getName());

		return qyCourseVO;
	}


}
